/*
 *	This file is part of Lounge-Cast.
 *
 *  Author:  	Markus Moormann
 *	E-mail:  	mmoorman@uni-osnabrueck.de
 *	Copyright:	University of Osnabrueck (Zentrum Virtuos)
 * 	Website:	www.uni-osnabrueck.de
 *	Date:		16.02.2011
 *
 *	Lounge-Cast is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *	Lounge-Cast is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Lounge-Cast.  If not, see <http://www.gnu.org/licenses/>.
 */
package multimedia.model.vo
{
	import mx.collections.ArrayCollection;
	

	/**
	 * class representing a slide
	 */
	[Bindable]
	[RemoteClass(alias="backend.vo.SlideVO")]
	public class SlideVO extends MediaVO
	{
		/**
		 * the URL pointing to the converted slide
		 */
		public var url:String;
		/**
		 * the aspect ratio of the slide ('16:9'|'4:3')
		 */
		public var aspect_ratio:String;
		/**
		 * the steps the slide has
		 */
		public var slideSteps:ArrayCollection;

		/**
		 * default constructor
		 */
		public function SlideVO()
		{
			slideSteps = new ArrayCollection();
		}

		/**
		 * method to get an instance of SlideVO
		 * 
		 * @param media the media containing all common information
		 * @param url the URL pointing to the converted slided
		 * @param aspect_ration the aspect ratio of the slide ('16:9'|'4:3')
		 * 
		 * @return an instance of SlideVO containing the given information
		 */
		public static function getInstance(media:MediaVO, url:String, aspect_ratio:String):SlideVO
		{
			var slide:SlideVO = new SlideVO();
			slide.media_id = media.media_id;
			slide.added = media.added;
			slide.addedBy = media.addedBy;
			slide.approved = media.approved;
			slide.converted = media.converted;
			slide.duration = media.duration;
			slide.newsticker = media.newsticker;
			slide.playlist_id = media.playlist_id;
			slide.position = media.position;
			slide.reference = media.reference;
			slide.title = media.title;
			slide.type = media.type;
			slide.start_date = media.start_date;
			slide.valid_date = media.valid_date;
			slide.category = media.category;

			slide.url = url;
			slide.aspect_ratio = aspect_ratio;

			return slide;
		}

	}
}